﻿#region Copyright (c) 2011, thinktecture (http://www.thinktecture.com)

/*
   thinktecture.UIAnnotations was developed by Jörg Neumann.
   Copyright (c) 2011, thinktecture (http://www.thinktecture.com).
   All rights reserved, comes as-is and without any warranty. Use of this
   source file is governed by the license which is contained in LICENSE.TXT 
   in the distribution.
*/

#endregion

using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using System.ComponentModel;

namespace Thinktecture.DataForm.Controls
{
    [DefaultProperty("Image")]
    public class ToolbarButton : Button
    {

        public ToolbarButton()
        {
            this.DefaultStyleKey = typeof(ToolbarButton);
        }

        #region ButtonHeight

        public static readonly DependencyProperty ButtonHeightProperty =
            DependencyProperty.Register("ButtonHeight", typeof(double), typeof(ToolbarButton), new PropertyMetadata(double.NaN));
        public double ButtonHeight { get { return (double)GetValue(ButtonHeightProperty); } set { SetValue(ButtonHeightProperty, value); } }

        #endregion

        #region Image

        public static readonly DependencyProperty ImageProperty =
            DependencyProperty.Register("Image", typeof(ImageSource), typeof(ToolbarButton), new PropertyMetadata(null));
        public ImageSource Image { get { return (ImageSource)this.GetValue(ImageProperty); } set { this.SetValue(ImageProperty, value); } }

        #endregion
                
    }
}
